package com.xjtu.vo.Report;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@AllArgsConstructor

@Builder
@Data
public class ReportVo {

    private XAxis xAxis;
    private YAxis yAxis;
    private List<Series> series;
    private Tooltip tooltip;
    private Legend legend;

    public ReportVo() {
        this.xAxis = new XAxis();
        this.yAxis = new YAxis();
        this.series = new ArrayList<>();
        this.tooltip = new Tooltip();
        this.legend = new Legend(new ArrayList<>());
    }

    public ReportVo(String name) {
        this.xAxis = new XAxis();
        this.yAxis = new YAxis();
        this.series = new ArrayList<>();
        this.tooltip = new Tooltip();
        this.legend = new Legend(new ArrayList<>());
        legend.getData().add(name);
    }

}
